import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.5

Window {
    width: 640
    height: 480
    visible: true
    title: qsTr("Hello World")

    //qml调用c++
    Button {
        text: 'click'
        objectName: 'buttonQml'
        property int count: 0
        signal countDemo(int count)
        onClicked: {
            ++count
            console.log(count)
            if (count%5 === 0)
                countDemo(count)
        }
    }
}
